<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of EaExcelPrinter
 *
 * @author EaDeveloper
 */
class EaExcelPrinter implements EasoftPrinter {

    public $db;

    public function write($report) {
        header("Content-type: application/vnd.ms-excel");
        header("Content-Disposition: attachment; filename=$report->key.xls");
        $report->show();
        /* $fields = array();
          foreach ($reporft->fields as $f) {
          $fields[] = $f['name'];
          }
          $excel = new MysqlExcel();
          $excel->db = $this->db;
          $excel->ImportArray($report->lastResult, $fields, $report->label . ".xls", true); */
    }

}

?>